package edu.cque.jt.common.filter;

import sun.applet.Main;

import java.util.List;

/**
 * @author Hua
 * @create 2022-07-27 23:40
 */
//过滤器
interface Filter{

}
//控制器
interface Servlet{

}
//过滤链
class FilterChain{
    private List<Filter> filters;//过滤器(请求数据过滤)
    private Servlet servlet;//控制器(请求控制逻辑)

    public FilterChain(List<Filter> filters, Servlet servlet) {
        this.filters.addAll(filters);//避免为空
        this.servlet = servlet;
    }

    public void doFilter(){
        for (int i = 0; i < filters.size(); i++) {
            //
        }
//        servlet.dispatch();

    }
}
public class FilterChainTests {
    public static void main(String[] args) {

    }
}
